package com.xinghou.platform.dao.main.common;

import com.xinghou.platform.dao.bases.redis.RedisOperator;
import com.xinghou.platform.util.AppContextUtil;

/**
 * Created by qingshengzheng on 16/6/26.
 */
public class DBSubjectLevelCached {
    public static int CACHED_SUBJECT_DB_INDEX = 8;
    public static final String CACHE_SUBJECT_ID = "subject:subject:%s";       //话题对象
    public static final String CACHE_SUBJECT_REPLYID = "subjectcache:replyid:%s";//话题回复对象
    public static final String CACHE_HOT_REPLY_SET = "hotreply:reply:%s";          //热门回复 sortset
    public static final String CACHE_LAST_SUBJECT_IDSET="last_subject_idlist";     //话题sort set  用于展示最新话题
    public static final String CACHE_SUBJECT_JOINNUM="subject_joinnum:%s";         //话题参与数
    public static final String CACHE_SUBJECT_REPLYNUM="subject_replynum:%s";       //话题回复数
    public static final String CACHE_SUBJECT_SHARENUM="subject_sharenum:%s";       //话题分享数
    public static final String CACHE_SUBJECT_CLICKNUM="subject_clicknum:%s";       //话题站外点击数
    public static final String CACHE_SUBJECT_REPLY_PRAISE="subjet_reply_praise:%s"; //话题回复点赞数
    public static final String CACHE_REPLY_USER_LIKE="reply_user_like:%s:%s";       //用于查看用户是否点赞过(查询key是否存在)


    public static RedisOperator getRedisClient(){
        return (RedisOperator) AppContextUtil.getBean("cachedMainRedisOperator");
    }
}
